CREATE TABLE `sys_user`
(
    `id`          bigint(32) NOT NULL,
    `username`    varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `password`    varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `name`        varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `mobile`      varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `email`       varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `status`      tinyint(2)                       DEFAULT NULL,
    `create_time` datetime                         DEFAULT NULL,
    `create_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `update_time` datetime                         DEFAULT NULL,
    `update_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `del_flag`    char(1) COLLATE utf8mb4_bin      DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

INSERT INTO `sys_user`(`id`, `username`, `password`, `name`, `mobile`, `email`, `status`, `create_time`, `create_by`,
                       `update_time`, `update_by`, `del_flag`)
VALUES (1, 'lemon', '$2a$10$c/Ae0pRjJtMZg3BnvVpO.eIK6WYWVbKTzqgdy3afR7w.vd.xi3Mgy', '我叫花花', '15767956846', '121', 1,
        '2020-09-13 11:34:07', 'admin', '2023-02-06 16:05:52', 'lemon', '0');


CREATE TABLE `sys_user_att`
(
    `id`          bigint(32) NOT NULL,
    `gender`      char(1)                                                DEFAULT NULL COMMENT '性别',
    `avatar`      varchar(255)                                           DEFAULT NULL COMMENT '头像',
    `birthday`    varchar(40)                                            DEFAULT NULL COMMENT '生日',
    `province`    varchar(40)                                            DEFAULT NULL COMMENT '省份',
    `idcard`      varchar(50)                                            DEFAULT NULL COMMENT 'idcard',
    `update_time` datetime                                               DEFAULT NULL,
    `update_by`   varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE `sys_role`
(
    `id`          bigint(20) NOT NULL,
    `name`        varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `is_sys`      tinyint(2)                       DEFAULT '0',
    `code`        varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `description` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `create_time` datetime                         DEFAULT NULL,
    `create_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `update_time` datetime                         DEFAULT NULL,
    `update_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `del_flag`    char(1) COLLATE utf8mb4_bin      DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

INSERT INTO `sys_role`(`id`, `name`, `is_sys`, `code`)
VALUES (1, '超级管理员', 1, 'ROLE_ROOT');
INSERT INTO `sys_role`(`id`, `name`, `is_sys`, `code`)
VALUES (2, '普通用户', 1, 'ROLE_GENERAL_USER');

CREATE TABLE `role_application`
(
    `role_id`    bigint(32) NOT NULL,
    `app_id`     bigint(32) NOT NULL,
    `scope_type` tinyint(1) DEFAULT NULL,
    PRIMARY KEY (`role_id`, `app_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;
CREATE TABLE `sys_application`
(
    `id`          bigint(20) NOT NULL COMMENT '应用id',
    `code`        varchar(50) COLLATE utf8mb4_bin  DEFAULT NULL COMMENT '应用code',
    `alias_name`  varchar(50) COLLATE utf8mb4_bin  DEFAULT NULL COMMENT '应用别称',
    `icon`        varchar(200) COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'icone',
    `description` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
    `status`      char(1) COLLATE utf8mb4_bin      DEFAULT NULL COMMENT '状态',
    `create_time` datetime                         DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    `create_by`   varchar(50) COLLATE utf8mb4_bin  DEFAULT NULL,
    `update_time` datetime                         DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    `update_by`   varchar(50) COLLATE utf8mb4_bin  DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;
INSERT INTO `sys_application`(`id`, `code`, `alias_name`, `icon`, `description`, `status`, `create_time`, `create_by`,
                              `update_time`, `update_by`)
VALUES (1, 'platform', '基础平台', NULL, '基础平台管理', NULL, '2023-09-04 12:27:24', 'admin', '2023-09-04 12:27:24', 'admin');


CREATE TABLE `sys_org`
(
    `id`          bigint(32) NOT NULL AUTO_INCREMENT,
    `parent_id`   bigint(32)                       DEFAULT NULL,
    `name`        varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `parent_ids`  varchar(500) COLLATE utf8mb4_bin DEFAULT NULL,
    `status`      tinyint(2)                       DEFAULT NULL,
    `sort_order`  int(5)                           DEFAULT '0',
    `create_time` datetime                         DEFAULT NULL,
    `create_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `update_time` datetime                         DEFAULT NULL,
    `update_by`   varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `del_flag`    char(1) COLLATE utf8mb4_bin      DEFAULT '0',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

INSERT INTO `sys_org`(`id`, `parent_id`, `parent_ids`, `name`, `status`, `sort_order`, `create_time`, `create_by`,
                      `update_time`, `update_by`, `del_flag`)
VALUES (1, -1, '-1', '强哥集团', 1, 0, '2020-09-13 11:39:07', 'admin', NULL, NULL, '0');


CREATE TABLE `role_org`
(
    `role_id` bigint(32) NOT NULL,
    `org_id`  bigint(32) NOT NULL,
    `app_id`  bigint(32) NOT NULL,
    PRIMARY KEY (`role_id`, `org_id`, `app_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

CREATE TABLE `role_permission`
(
    `role_id`       bigint(32) NOT NULL,
    `permission_id` bigint(32) NOT NULL,
    PRIMARY KEY (`role_id`, `permission_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

CREATE TABLE `user_role`
(
    `user_id` bigint(32) NOT NULL,
    `role_id` bigint(32) NOT NULL,
    PRIMARY KEY (`user_id`, `role_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

CREATE TABLE `user_org`
(
    `user_id` bigint(32) NOT NULL,
    `org_id`  bigint(32) NOT NULL,
    PRIMARY KEY (`user_id`, `org_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;

CREATE TABLE `sys_dict`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `type`        varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型',
    `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '描述',
    `remark`      varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
    `system_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci      DEFAULT '0' COMMENT '字典类型（1：系统类，0：业务类）',
    `del_flag`    char(1) CHARACTER SET utf8 COLLATE utf8_general_ci      DEFAULT '0' COMMENT '删除标记',
    `create_time` datetime                                                DEFAULT NULL COMMENT '创建时间',
    `create_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '创建人',
    `update_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '更新人',
    `update_time` datetime                                                DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `sys_dict_del_flag` (`del_flag`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_general_ci COMMENT ='字典表';

CREATE TABLE `sys_dict_item`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `dict_id`     bigint NOT NULL COMMENT '字典ID',
    `value`       varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '值',
    `label`       varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标签',
    `type`        varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '字典类型',
    `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '描述',
    `sort_order`  int    NOT NULL                                         DEFAULT '0' COMMENT '排序（升序）',
    `remark`      varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT ' ' COMMENT '备注',
    `del_flag`    char(1) CHARACTER SET utf8 COLLATE utf8_general_ci      DEFAULT '0' COMMENT '删除标记',
    `create_time` datetime                                                DEFAULT NULL COMMENT '创建时间',
    `create_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '创建人',
    `update_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '修改人',
    `update_time` datetime                                                DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `sys_dict_value` (`value`) USING BTREE,
    KEY `sys_dict_label` (`label`) USING BTREE,
    KEY `sys_dict_del_flag` (`del_flag`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_general_ci COMMENT ='字典项';

BEGIN;
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (1, 'dict_type', '字典类型', NULL, '0', '0', '2019-05-16 14:16:20', '', 'admin', '2021-12-29 12:29:18');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (2, 'log_type', '日志类型', NULL, '0', '0', '2020-03-13 14:21:01', '', 'admin', '2021-12-29 12:30:14');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (3, 'ds_type', '驱动类型', NULL, '0', '0', '2021-10-15 16:24:35', '', 'admin', '2021-12-29 12:30:18');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (4, 'param_type', '参数配置', '检索、原文、报表、安全、文档、消息、其他', '1', '0', '2022-03-25 20:51:26', 'admin', 'admin',
        '2022-03-25 20:51:26');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (5, 'status_type', '租户状态', '租户状态', '1', '0', '2022-03-25 20:56:51', 'admin', 'admin', '2022-03-25 20:56:51');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (6, 'gender', '性别', '性别', '1', '0', '2023-03-07 14:21:47', 'admin', 'admin', '2023-03-07 14:21:47');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (7, 'subscribe', '订阅状态', '订阅状态', '1', '0', '2023-03-07 14:22:07', 'admin', 'admin', '2023-03-07 14:22:07');
INSERT INTO `sys_dict`(`id`, `type`, `description`, `remark`, `system_flag`, `del_flag`, `create_time`, `create_by`,
                       `update_by`, `update_time`)
VALUES (8, 'response_type', '回复', '回复', '1', '0', '2023-03-07 14:22:27', 'admin', 'admin', '2023-03-07 14:22:34');
COMMIT;

BEGIN;
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (1, 1, '1', '系统类', 'dict_type', '系统类字典', 0, ' ', '0', '2019-05-16 14:20:40', NULL, NULL, '2019-05-16 14:20:40');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (2, 1, '0', '业务类', 'dict_type', '业务类字典', 0, ' ', '0', '2019-05-16 14:20:59', NULL, NULL, '2019-05-16 14:20:59');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (3, 2, '0', '正常', 'log_type', '正常', 0, ' ', '0', '2020-03-13 14:23:22', NULL, NULL, '2020-03-13 14:23:22');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (4, 2, '9', '异常', 'log_type', '异常', 0, ' ', '0', '2020-03-13 14:23:35', NULL, NULL, '2020-03-13 14:23:35');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (5, 3, 'com.mysql.cj.jdbc.Driver', 'MYSQL8', 'ds_type', 'MYSQL8', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (6, 3, 'com.mysql.jdbc.Driver', 'MYSQL5', 'ds_type', 'MYSQL5', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (7, 3, 'oracle.jdbc.OracleDriver', 'Oracle', 'ds_type', 'Oracle', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (8, 3, 'org.mariadb.jdbc.Driver', 'mariadb', 'ds_type', 'mariadb', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (9, 3, 'com.microsoft.sqlserver.jdbc.SQLServerDriver', 'sqlserver2005+', 'ds_type', 'sqlserver2005+', 0, ' ',
        '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (10, 3, 'com.microsoft.jdbc.sqlserver.SQLServerDriver', 'sqlserver2000', 'ds_type', 'sqlserver2000', 0, ' ', '0',
        NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (11, 3, 'com.ibm.db2.jcc.DB2Driver', 'db2', 'ds_type', 'db2', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (12, 3, 'org.postgresql.Driver', 'postgresql', 'ds_type', 'postgresql', 0, ' ', '0', NULL, NULL, NULL, NULL);
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (13, 4, '1', '检索', 'param_type', '检索', 0, '检索', '0', '2022-03-25 20:51:51', 'admin', 'admin',
        '2022-03-25 20:51:51');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (14, 4, '2', '原文', 'param_type', '原文', 1, '原文', '0', '2022-03-25 20:52:06', 'admin', 'admin',
        '2022-03-25 20:52:06');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (15, 4, '3', '报表', 'param_type', '报表', 2, '报表', '0', '2022-03-25 20:52:16', 'admin', 'admin',
        '2022-03-25 20:52:16');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (16, 4, '4', '安全', 'param_type', '安全', 3, '安全', '0', '2022-03-25 20:52:32', 'admin', 'admin',
        '2022-03-25 20:52:32');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (17, 4, '5', '文档', 'param_type', '文档', 4, '文档', '0', '2022-03-25 20:52:52', 'admin', 'admin',
        '2022-03-25 20:52:52');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (18, 4, '6', '消息', 'param_type', '消息', 5, '消息', '0', '2022-03-25 20:53:07', 'admin', 'admin',
        '2022-03-25 20:53:07');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (19, 4, '9', '其他', 'param_type', '其他', 6, '其他', '0', '2022-03-25 20:54:50', 'admin', 'admin',
        '2022-03-25 20:54:50');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (20, 4, '0', '默认', 'param_type', '默认', 7, '默认', '0', '2022-03-25 20:55:23', 'admin', 'admin',
        '2022-03-25 20:55:23');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (21, 5, '0', '正常', 'status_type', '状态正常', 0, '状态正常', '0', '2022-03-25 20:57:12', 'admin', 'admin',
        '2022-03-25 20:57:12');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (22, 5, '9', '冻结', 'status_type', '状态冻结', 1, '状态冻结', '0', '2022-03-25 20:57:34', 'admin', 'admin',
        '2022-03-25 20:57:34');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (23, 6, '1', '男', 'gender', '男', 1, '男', '0', '2023-03-07 14:25:36', 'lemon', 'lemon', '2023-03-07 14:25:36');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (24, 6, '2', '女', 'gender', '女', 2, '女', '0', '2023-03-07 14:25:50', 'lemon', 'lemon', '2023-03-07 14:25:50');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (25, 6, '3', '未知', 'gender', '未知', 0, '未知', '0', '2023-03-07 14:26:11', 'lemon', 'lemon', '2023-03-07 14:26:11');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (26, 7, '0', '未关注', 'subscribe', '未关注', 1, '未关注', '0', '2023-03-07 14:26:24', 'lemon', 'lemon',
        '2023-03-07 14:26:24');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (27, 7, '1', '已关注', 'subscribe', '已关注', 2, '已关注', '0', '2023-03-07 14:26:33', 'lemon', 'lemon',
        '2023-03-07 14:26:33');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (28, 8, '0', '未回复', 'response_type', '未回复', 1, '未回复', '0', '2023-03-07 14:26:44', 'lemon', 'lemon',
        '2023-03-07 14:26:44');
INSERT INTO `sys_dict_item`(`id`, `dict_id`, `value`, `label`, `type`, `description`, `sort_order`, `remark`,
                            `del_flag`, `create_time`, `create_by`, `update_by`, `update_time`)
VALUES (29, 8, '1', '已回复', 'response_type', '已回复', 2, '已回复', '0', '2023-03-07 14:26:54', 'lemon', 'lemon',
        '2023-03-07 14:26:54');
COMMIT;

CREATE TABLE `sys_menu`
(
    `id`          bigint(20)  NOT NULL AUTO_INCREMENT,
    `name`        varchar(32) NOT NULL COMMENT '菜单名称',
    `permission`  varchar(32)          DEFAULT NULL COMMENT '菜单权限标识',
    `path`        varchar(128)         DEFAULT NULL COMMENT '前端URL',
    `parent_id`   bigint(20)           DEFAULT NULL COMMENT '父菜单ID',
    `app_id`      bigint(20)  NOT NULL DEFAULT '1' COMMENT '应用id',
    `icon`        varchar(32)          DEFAULT NULL COMMENT '图标',
    `sort_order`  int(11)     NOT NULL DEFAULT '0' COMMENT '排序值',
    `type`        char(1)              DEFAULT NULL COMMENT '菜单类型 （0菜单 1按钮 2顶菜单）',
    `create_by`   varchar(64)          DEFAULT NULL COMMENT '创建人',
    `create_time` datetime             DEFAULT NULL COMMENT '创建时间',
    `update_by`   varchar(64)          DEFAULT NULL COMMENT '修改人',
    `update_time` datetime             DEFAULT NULL COMMENT '更新时间',
    `del_flag`    char(1)              DEFAULT '0' COMMENT '逻辑删除标志',
    `keep_alive`  char(1)              DEFAULT '0' COMMENT '是否路由缓冲',
    `status`      char(1)              DEFAULT '1' COMMENT '是否隐藏/显示',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  ROW_FORMAT = DYNAMIC COMMENT ='菜单权限表';

INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1000, '权限管理', NULL, '/admin', -1, 'icon-quanxianguanli', 1, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1100, '用户管理', NULL, '/admin/user/index', 1000, 'icon-yonghuguanli', 0, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1101, '用户新增', 'sys_user_add', NULL, 1100, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1102, '用户修改', 'sys_user_edit', NULL, 1100, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1103, '用户删除', 'sys_user_del', NULL, 1100, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1104, '导入导出', 'sys_user_import_export', NULL, 1100, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1105, '强制下线', 'sys_token_del', NULL, 1100, 'icon-shejiyukaifa-', 5, '1', 'lemon', '2023-02-09 21:54:04',
        'lemon', '2023-02-09 21:54:04', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1106, '刷新缓存', 'sys_publicparam_sync', NULL, 2700, NULL, 4, '1', 'lemon', '2023-02-09 22:23:57', 'lemon',
        '2023-02-09 22:23:57', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1200, '菜单管理', NULL, '/admin/menu/index', 1000, 'icon-caidanguanli', 1, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1201, '菜单新增', 'sys_menu_add', NULL, 1200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1202, '菜单修改', 'sys_menu_edit', NULL, 1200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1203, '菜单删除', 'sys_menu_del', NULL, 1200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1300, '角色管理', NULL, '/admin/role/index', 1000, 'icon-jiaoseguanli', 2, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1301, '角色新增', 'sys_role_add', NULL, 1300, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1302, '角色修改', 'sys_role_edit', NULL, 1300, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1303, '角色删除', 'sys_role_del', NULL, 1300, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1304, '操作权限', 'sys_role_perm', NULL, 1300, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1305, '数据权限', 'sys_role_data', NULL, 1300, NULL, 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1306, '导入导出', 'sys_role_import_export', NULL, 1300, NULL, 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1400, '部门管理', NULL, '/admin/org/index', 1000, 'icon-web-icon-', 3, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1401, '部门新增', 'sys_org_add', NULL, 1400, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1402, '部门修改', 'sys_org_edit', NULL, 1400, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1403, '部门删除', 'sys_org_del', NULL, 1400, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1500, '岗位管理', '', '/admin/post/index', 1000, 'icon-guanwang', 4, '0', NULL, '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1501, '岗位查看', 'sys_post_get', NULL, 1500, '1', 0, '1', NULL, '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1502, '岗位新增', 'sys_post_add', NULL, 1500, '1', 1, '1', NULL, '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1503, '岗位修改', 'sys_post_edit', NULL, 1500, '1', 2, '1', NULL, '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (1504, '岗位删除', 'sys_post_del', NULL, 1500, '1', 3, '1', NULL, '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2000, '系统管理', NULL, '/setting', -1, 'icon-xitongguanli', 2, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2100, '日志管理', NULL, '/admin/log/index', 2000, 'icon-rizhiguanli', 3, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2101, '日志删除', 'sys_log_del', NULL, 2100, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2200, '字典管理', NULL, '/admin/dict/index', 2000, 'icon-navicon-zdgl', 2, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2201, '字典删除', 'sys_dict_del', NULL, 2200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2202, '字典新增', 'sys_dict_add', NULL, 2200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2203, '字典修改', 'sys_dict_edit', NULL, 2200, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2400, '终端管理', '', '/admin/client/index', 2000, 'icon-shouji', 0, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2401, '客户端新增', 'sys_client_add', NULL, 2400, '1', 0, '1', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2402, '客户端修改', 'sys_client_edit', NULL, 2400, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2403, '客户端删除', 'sys_client_del', NULL, 2400, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2600, '文件管理', NULL, '/admin/file/index', 2000, 'icon-wenjianguanli', 1, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2601, '文件删除', 'sys_file_del', NULL, 2600, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2602, '文件新增', 'sys_file_add', NULL, 2600, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2603, '文件修改', 'sys_file_edit', NULL, 2600, NULL, 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2700, '参数管理', NULL, '/admin/param/index', 2000, 'icon-navicon-zdgl', 5, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2701, '参数新增', 'sys_publicparam_add', NULL, 2700, NULL, 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2702, '参数删除', 'sys_publicparam_del', NULL, 2700, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (2703, '参数修改', 'sys_publicparam_edit', NULL, 2700, NULL, 3, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3000, '开发平台', NULL, '/gen', -1, 'icon-shejiyukaifa-', 3, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3100, '数据源管理', NULL, '/gen/datasource', 3000, 'icon-mysql', 3, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3200, '代码生成', NULL, '/gen/index', 3000, 'icon-weibiaoti46', 0, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3300, '表单管理', NULL, '/gen/form', 3000, 'icon-record', 1, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3301, '表单新增', 'gen_form_add', NULL, 3300, '', 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3302, '表单修改', 'gen_form_edit', NULL, 3300, '', 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3303, '表单删除', 'gen_form_del', NULL, 3300, '', 0, '1', ' ', '2020-09-13 11:39:07', ' ', '2020-09-13 11:39:07',
        '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (3400, '表单设计', NULL, '/gen/design', 3000, 'icon-biaodanbiaoqian', 2, '0', ' ', '2020-09-13 11:39:07', ' ',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (4000, '服务监控', NULL, 'http://localhost:5001/login', -1, 'icon-zhexiantu', 4, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (9999, '系统官网', NULL, 'https://lemon-cloud.com/#/', -1, 'icon-guanwangfangwen', 999, '0', ' ',
        '2020-09-13 11:39:07', 'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6000, '微信管理', NULL, '/mp', -1, 'icon-gongzhonghao', 4, '0', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6100, '账号管理', '', '/mp/wxaccount/index', 6000, 'icon-weixincaidan', 8, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6101, '公众号新增', 'mp_wxaccount_add', '', 6100, '', 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6102, '公众号修改', 'mp_wxaccount_edit', NULL, 6100, '', 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6103, '公众号删除', 'mp_wxaccount_del', NULL, 6100, '', 2, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6200, '粉丝管理', '', '/mp/wxaccountfans/index', 6000, 'icon-fensiguanli', 8, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6201, '粉丝新增', 'mp_wxaccountfans_add', NULL, 6200, '', 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6202, '粉丝修改', 'mp_wxaccountfans_edit', NULL, 6200, '', 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6203, '粉丝删除', 'mp_wxaccountfans_del', NULL, 6200, '', 2, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6204, '粉丝同步', 'mp_wxaccountfans_sync', NULL, 6200, '', 3, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6300, '消息管理', '', '/mp/wxfansmsg/index', 6000, 'icon-xiaoxiguanli', 8, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6301, '消息新增', 'mp_wxmsg_add', NULL, 6300, '', 0, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6302, '消息修改', 'mp_wxmsg_edit', NULL, 6300, '', 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6303, '消息删除', 'mp_wxmsg_del', NULL, 6300, '', 2, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6400, '菜单设置', NULL, '/mp/wxmenu/index', 6000, 'icon-anniu_weixincaidanlianjie', 6, '0', 'admin',
        '2020-09-13 11:39:07', 'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6401, '保存', 'mp_wxmenu_add', NULL, 6400, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6402, '发布', 'mp_wxmenu_push', NULL, 6400, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6403, '删除', 'mp_wxmenu_del', NULL, 6400, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6500, '运营数据', NULL, '/mp/wxstatistics/index', 6000, 'icon-zhexiantu', 7, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6600, '素材管理', NULL, '/mp/wxmaterial/index', 6000, 'icon-sucaisads', 999, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6601, '素材维护', 'mp_wxmaterial_add', NULL, 6600, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6602, '素材删除', 'mp_wxmaterial_del', NULL, 6600, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6700, '自动回复', NULL, '/mp/wxautoreply/index', 6000, 'icon-huifu', 998, '0', 'admin', '2020-09-13 11:39:07',
        'admin', '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6701, '新增回复', 'mp_wxautoreply_add', NULL, 6700, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6702, '编辑回复', 'mp_wxautoreply_edit', NULL, 6700, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6703, '删除回复', 'mp_wxautoreply_del', NULL, 6700, NULL, 1, '1', 'admin', '2020-09-13 11:39:07', 'admin',
        '2020-09-13 11:39:07', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (6404, '同步', 'mp_wxmenu_sync', NULL, 6400, NULL, 1, '1', 'lemon', '2023-03-06 14:42:48', 'lemon',
        '2023-03-06 14:42:48', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5000, '支付管理', NULL, '/pay', -1, 'icon-pay6zhifu', 4, '0', 'admin', '2019-05-30 15:28:03', 'admin',
        '2019-05-30 15:28:03', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5100, '渠道管理', NULL, '/pay/paychannel/index', 5000, 'icon-zhifuqudaoguanli', 1, '0', 'admin',
        '2019-05-30 15:32:17', 'admin', '2019-05-30 15:32:17', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5110, '增加渠道', 'pay_paychannel_add', NULL, 5100, NULL, 1, '1', 'admin', '2019-05-30 15:46:14', 'admin',
        '2019-05-30 15:46:14', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5120, '编辑渠道', 'pay_paychannel_edit', NULL, 5100, NULL, 1, '1', 'admin', '2019-05-30 15:46:35', 'admin',
        '2019-05-30 15:46:35', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5130, '删除渠道', 'pay_paychannel_del', NULL, 5100, NULL, 1, '1', 'admin', '2019-05-30 15:47:08', 'admin',
        '2019-05-30 15:47:08', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5200, '收银台', NULL, '/pay/cd/index', 5000, 'icon-shouyintai', 0, '0', 'admin', '2019-05-30 19:44:00', 'admin',
        '2019-05-30 19:44:00', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5300, '商品订单', '', '/pay/goods/index', 5000, 'icon-dingdan', 2, '0', 'admin', '2018-01-20 13:17:19', 'admin',
        '2018-01-20 13:17:19', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5310, '商品订单新增', 'generator_paygoodsorder_add', NULL, 5300, NULL, 0, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5320, '商品订单修改', 'generator_paygoodsorder_edit', NULL, 5300, NULL, 1, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5330, '商品订单删除', 'generator_paygoodsorder_del', NULL, 5300, NULL, 2, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5400, '支付订单', '', '/pay/orders/index', 5000, 'icon-zhifu', 3, '0', 'admin', '2018-01-20 13:17:19', 'admin',
        '2018-01-20 13:17:19', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5410, '支付订单新增', 'generator_paytradeorder_add', NULL, 5400, NULL, 0, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5420, '支付订单修改', 'generator_paytradeorder_edit', NULL, 5400, NULL, 1, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5430, '支付订单删除', 'generator_paytradeorder_del', NULL, 5400, NULL, 2, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5500, '回调记录', '', '/pay/notify/index', 5000, 'icon-huitiao', 4, '0', 'admin', '2018-01-20 13:17:19', 'admin',
        '2018-01-20 13:17:19', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5510, '记录新增', 'generator_paynotifyrecord_add', NULL, 5500, NULL, 0, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5520, '记录修改', 'generator_paynotifyrecord_edit', NULL, 5500, NULL, 1, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');
INSERT INTO `sys_menu`(`id`, `name`, `permission`, `path`, `parent_id`, `icon`, `sort_order`, `type`, `create_by`,
                       `create_time`, `update_by`, `update_time`, `del_flag`)
VALUES (5530, '记录删除', 'generator_paynotifyrecord_del', NULL, 5500, NULL, 2, '1', 'admin', '2018-05-15 21:35:18',
        'admin', '2018-05-15 21:35:18', '0');

DROP TABLE IF EXISTS `sys_public_param`;
CREATE TABLE `sys_public_param`
(
    `id`            bigint(20)  NOT NULL AUTO_INCREMENT COMMENT '编号',
    `name`          varchar(128)         DEFAULT NULL,
    `key`           varchar(128)         DEFAULT NULL,
    `value`         varchar(128)         DEFAULT NULL,
    `status`        char(1)              DEFAULT '0',
    `validate_code` varchar(64)          DEFAULT NULL,
    `create_by`     varchar(64) NOT NULL DEFAULT ' ' COMMENT '创建人',
    `update_by`     varchar(64) NOT NULL DEFAULT ' ' COMMENT '修改人',
    `create_time`   datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time`   datetime             DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
    `type`          char(1)              DEFAULT '0',
    `system_flag`   char(1)              DEFAULT '0',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `key` (`key`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 3
  DEFAULT CHARSET = utf8 COMMENT ='公共参数配置表';

-- ----------------------------
-- Records of sys_public_param
-- ----------------------------
BEGIN;
INSERT INTO `sys_public_param`(`id`, `name`, `key`, `value`, `status`, `validate_code`, `create_by`, `update_by`,
                               `create_time`, `update_time`, `type`, `system_flag`)
VALUES (1, '接口文档不显示的字段', 'GEN_HIDDEN_COLUMNS', 'tenant_id', '0', '', ' ', ' ', '2020-09-13 11:39:07',
        '2020-09-13 11:39:07', '9', '1');
INSERT INTO `sys_public_param`(`id`, `name`, `key`, `value`, `status`, `validate_code`, `create_by`, `update_by`,
                               `create_time`, `update_time`, `type`, `system_flag`)
VALUES (2, '注册用户默认角色', 'USER_DEFAULT_ROLE', 'ROLE_GENERAL_USER', '0', '', 'admin', 'admin', '2020-09-13 11:39:07',
        '2020-09-13 11:39:07', '2', '1');
COMMIT;

DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post`
(
    `id`          bigint(20)                                              NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
    `code`        varchar(64)                                             NOT NULL COMMENT '岗位编码',
    `name`        varchar(50)                                             NOT NULL COMMENT '岗位名称',
    `sort`        int(11)                                                 NOT NULL COMMENT '岗位排序',
    `del_flag`    char(1) CHARACTER SET utf8 COLLATE utf8_general_ci      NOT NULL DEFAULT '0' COMMENT '是否删除  -1：已删除  0：正常',
    `create_time` datetime(0)                                             NULL     DEFAULT NULL COMMENT '创建时间',
    `create_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  NULL     DEFAULT '' COMMENT '创建人',
    `update_time` datetime(0)                                             NULL     DEFAULT NULL COMMENT '更新时间',
    `update_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  NULL     DEFAULT '' COMMENT '更新人',
    `remark`      varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL     DEFAULT NULL COMMENT '备注信息',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC COMMENT = '岗位信息表';


CREATE TABLE `user_post`
(
    `user_id` bigint(32) NOT NULL,
    `post_id` bigint(32) NOT NULL,
    PRIMARY KEY (`user_id`, `post_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_bin;


DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log`
(
    `id`          bigint NOT NULL,
    `type`        varchar(100) COLLATE utf8_general_ci  DEFAULT '1' COMMENT '日志类型',
    `title`       varchar(255) COLLATE utf8_general_ci  DEFAULT '' COMMENT '日志标题',
    `service_id`  varchar(32) COLLATE utf8_general_ci   DEFAULT NULL COMMENT '服务ID',
    `remote_addr` varchar(255) COLLATE utf8_general_ci  DEFAULT NULL COMMENT '操作IP地址',
    `user_agent`  varchar(1000) COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户代理',
    `request_uri` varchar(255) COLLATE utf8_general_ci  DEFAULT NULL COMMENT '请求URI',
    `method`      varchar(10) COLLATE utf8_general_ci   DEFAULT NULL COMMENT '操作方式',
    `params`      text COLLATE utf8_general_ci COMMENT '操作提交的数据',
    `time`        bigint                                DEFAULT NULL COMMENT '执行时间',
    `del_flag`    char(1) COLLATE utf8_general_ci       DEFAULT '0' COMMENT '删除标记',
    `exception`   text COLLATE utf8_general_ci COMMENT '异常信息',
    `create_time` datetime                              DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                              DEFAULT NULL COMMENT '更新时间',
    `create_by`   varchar(64) COLLATE utf8_general_ci   DEFAULT NULL COMMENT '创建人',
    `update_by`   varchar(64) COLLATE utf8_general_ci   DEFAULT NULL COMMENT '更新人',
    PRIMARY KEY (`id`),
    KEY `sys_log_create_by` (`create_by`),
    KEY `sys_log_request_uri` (`request_uri`),
    KEY `sys_log_type` (`type`),
    KEY `sys_log_create_date` (`create_time`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='日志表';


CREATE TABLE `sys_file`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `file_name`   varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `bucket_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `original`    varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `type`        varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL,
    `file_size`   bigint                                                  DEFAULT NULL COMMENT '文件大小',
    `del_flag`    char(1) CHARACTER SET utf8 COLLATE utf8_general_ci      DEFAULT '0' COMMENT '0-正常，1-删除',
    `create_time` datetime                                                DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                DEFAULT NULL COMMENT '修改时间',
    `create_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '创建者',
    `update_by`   varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci  DEFAULT NULL COMMENT '更新人',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_general_ci COMMENT ='文件管理表';

CREATE TABLE `sys_file_upload_task` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `upload_id` varchar(255) NOT NULL COMMENT '分片上传的uploadId',
    `identifier` varchar(500) NOT NULL COMMENT '文件唯一标识（md5）',
    `original` varchar(500) NOT NULL COMMENT '文件名',
    `bucket_name` varchar(255) NOT NULL COMMENT '所属桶名',
    `file_name` varchar(500) NOT NULL COMMENT '文件的key',
    `file_size` bigint(20) NOT NULL COMMENT '文件大小（byte）',
    `chunk_size` bigint(20) NOT NULL COMMENT '每个分片大小（byte）',
    `chunk_num` int(11) NOT NULL COMMENT '分片数量',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uq_file_identifier` (`identifier`) USING BTREE,
    UNIQUE KEY `uq_upload_id` (`upload_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='分片上传-分片任务记录';

INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1000);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1100);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1101);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1102);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1103);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1104);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1200);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1201);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1202);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1203);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1300);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1301);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1302);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1303);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1304);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1305);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1400);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1401);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1402);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1403);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1500);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1501);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1502);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1503);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1504);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 1505);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2000);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2100);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2101);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2102);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2200);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2201);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2202);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2203);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2300);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2301);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2400);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2401);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2402);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2403);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2600);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2601);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2602);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2603);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2700);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2701);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2702);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 2703);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3000);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3100);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3200);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3300);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3301);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3302);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3303);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 3400);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 4000);
INSERT INTO `role_permission` (`role_id`, `permission_id`)
VALUES (1, 9999);
